<?php
$this->pageHeader = t('LBL_EDIT_PROFILE', 'profile');
$this->pageTitle = t('PAGE_TITLE', 'profile');
$logedInUser = User::model()->findByPk(Yii::app()->user->id);
$toolbar = new LGToolbar();
$toolbar->ButtonSave(t('BTN_SAVE', 'profile'), '#profile-form', ActionType::SAVE);
if ($model->status == ProfileStatus::STATUS_NEW){
    $toolbar->ButtonSave(t('BTN_SUBMIT','profile'), '#profile-form', ActionType::SUBMIT);
}else if ($model->status == ProfileStatus::STATUS_REJECTED){
    $toolbar->ButtonSave(t('BTN_RESUBMIT','profile'), '#profile-form', ActionType::SUBMIT);
}  
$toolbar->buttonDetail(t('BTN_DETAIL','profile'), t('BTN_DETAIL','profile'), 'buttonDetail', '', "profile/detail", array("id" => $model->id,"alias"=>stringURLSafe($model->full_name)));
if($logedInUser->isAdmin() || $logedInUser->isSuperAdmin())
{
	$toolbar->ButtonSave(t('BTN_SAVE_AND_CREATE_ADVANCE', 'profile'), '#profile-form', ActionType::SAVE_CREATE_ADVANCE);
}
$toolbar->Cancel('btnCancel',t('BTN_CANCEL'));
$this->pageToolbar = $toolbar->mergeToolbar();
//$this->breadcrumbs = array('Management', t('LBL_PROFILE', 'profile') => array('Index'));
?>

<div class="moreinfo">
	<table>
		<tr>
			<td>Trạng thái: <?php echo t("STATUS_" . $model->status, "profile"); ?></td>
			<td style="width: 50px;"></td>
			<td><?php echo t("HEADER_UPDATE_DATE", "history"); ?></td>
			<td><span><?php echo $model->update_date; ?></span></td>
		</tr>
	</table>
</div>
<?php
   $this->renderPartial('_form', array('model'=>$model));
?>
